﻿﻿<template>
    <el-card class="form-container">
        <el-form :model="editForm" ref="editForm" :rules="dataRule"  @keyup.enter.native="dataFormSubmitHandle()" label-width="90px">
                                                                            <el-form-item label="评论内容" prop="commentContent">
                        <el-input v-model="editForm.commentContent" placeholder="请输入评论内容"></el-input>
                    </el-form-item>
                                                                <el-form-item label="用户编号" prop="userCode">
                        <el-input v-model="editForm.userCode" placeholder="请输入用户编号"></el-input>
                    </el-form-item>
                                                                <el-form-item label="是否包含图片 1.是 2.否" prop="hasPicture">
                        <el-input v-model="editForm.hasPicture" placeholder="请输入是否包含图片 1.是 2.否"></el-input>
                    </el-form-item>
                                                                <el-form-item label="图片地址" prop="picUrls">
                        <el-input v-model="editForm.picUrls" placeholder="请输入图片地址"></el-input>
                    </el-form-item>
                                                                <el-form-item label="评分" prop="commentScore">
                        <el-input v-model="editForm.commentScore" placeholder="请输入评分"></el-input>
                    </el-form-item>
                                                                <el-form-item label="评论类型 1.商品" prop="commentType">
                        <el-input v-model="editForm.commentType" placeholder="请输入评论类型 1.商品"></el-input>
                    </el-form-item>
                                                                <el-form-item label="评论时间" prop="createTime">
                        <el-input v-model="editForm.createTime" placeholder="请输入评论时间"></el-input>
                    </el-form-item>
                                                                <el-form-item label="回复时间" prop="replyTime">
                        <el-input v-model="editForm.replyTime" placeholder="请输入回复时间"></el-input>
                    </el-form-item>
                                                                <el-form-item label="回复内容" prop="merchantReply">
                        <el-input v-model="editForm.merchantReply" placeholder="请输入回复内容"></el-input>
                    </el-form-item>
                                        <el-form-item>
                <el-button @click="cancel">取消</el-button>
                <el-button type="primary"  @click="submit('dataForm')">确定</el-button>
            </el-form-item>
        </el-form>
    </el-card>
</template>

<script>
    import { findGoodsCommentDetail } from '@/api/admin/user'
    export default{
        name: 'user-goodsComment',
        data(){
            return {
                editForm:{
                                                                                                                    commentContent : ''
                                                                                                userCode : ''
                                                                                                hasPicture : ''
                                                                                                picUrls : ''
                                                                                                commentScore : ''
                                                                                                commentType : ''
                                                                                                createTime : ''
                                                                                                replyTime : ''
                                                                                                merchantReply : ''
                                                            }
            }
        },
        created(){
            this.editForm.id = this.$route.query.id
            this.view(this.$route.query.id)
        },
        methods:{
            view(val){
                findGoodsCommentDetail(val).then(res => {
                    this.editForm = res.data.responseData
            })
            },
            cancel(){
                this.$router.go(-1)
            },
            update(){

            }
        }
    }
</script>

<style>
</style>
